import React, { Component, createRef } from "react";
import { Form, Select, Input } from "antd";
const Item = Form.Item;
const Option = Select.Option;

class UpdateForm extends Component {
  inputRef = createRef();
  onFinish = (value) => {
    console.log(value);
    // this.formRef = createRef();
    // this.;
  };
	render () {
	//   console.log(form);
		console.log(this.props.form);
    return (
      <div>
        <Form
          formRef={this.formRef}
          initialValues={{ catename: this.props.categoryName }}
        >
          <Item
            
            name="catename"
            rules={[
              {
                required: true,
                message: "分类必须输入",
              },
            ]}
          >
            <Input ref={this.inputRef} />
          </Item>
        </Form>
      </div>
    );
  }
}
export default UpdateForm;
